import { HYEventStore } from 'hy-event-store'
import { getPlayList } from '../services/index'
const musicStore = new HYEventStore({
  state:{
    recommendMusicList:[]
  },
  actions:{
    async fetchPlayListAction(ctx, payload){
      // ctx 相当于state 
      const res = await getPlayList(payload)
      // console.log(res)
      ctx.recommendMusicList = res.playlist
    }
  }
})
export default musicStore
